const express = require("express");
const router = express.Router();
// 引入第三方别人封装好的验证规则
const expressJoi = require("@escook/express-joi");
const userSchema = require("../sechma/user");
// 方式一
const userHandler = require("../router_handler/user");
router.post("/reguser", expressJoi(userSchema), userHandler.regUser);
router.post("/login", expressJoi(userSchema), userHandler.login);
// 方式二  解构出来
// const { regUser, login } = require('../router_handler/user')
// router.post('/reguser', regUser)
// router.post('/login', login)
module.exports = router;
